﻿using System;
using System.Data;
using log4net;


namespace DevMaker.SIC.Model {
    public class PuntoVenta {
        private static readonly ILog Log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
        public String Code { set; get; }
        public String Nombre { set; get; }
        public Boolean Activo { set; get; }

        public void ReadFromDataReader(IDataReader reader) {
            try {
                Code = reader["Workstation_strCode"].ToString();
                Nombre = reader["Workstation_strName"].ToString();
                if (reader["Workstation_strEnabled"].ToString().ToUpper() == "Y")
                    Activo = true;
            } catch (Exception ex) {
                Log.Error(ex);
            }
        }
        public override String ToString() {
            return Nombre;
        }
    }
}
